package backTrack;

import java.util.*;

public class hu2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int[] num1 = new int[m];
        for (int i = 0; i < m; i++) {
            num1[i] = sc.nextInt();
        }
        int n = sc.nextInt();
        int[] num2 = new int[n];
        for (int i = 0; i < n; i++) {
            num2[i] = sc.nextInt();
        }
        int k = sc.nextInt();
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                int s = num1[i] + num2[j];
                list.add(s);
            }
        }
        Collections.sort(list);
        int re = 0;
        for (int i = 0; i < k; i++) {
            re += list.get(i);
        }
        System.out.println(re);
    }

}
